import request from '@/utils/request'

// 获取点位列表
export function getPointList(params) {
  return request({
    url: '/api/points',
    method: 'get',
    params
  })
}

// 新增点位
export function addPoint(data) {
  return request({
    url: '/api/points',
    method: 'post',
    data
  })
}

// 更新点位
export function updatePoint(data) {
  return request({
    url: `/api/points/${data.id}`,
    method: 'put',
    data
  })
}

// 删除点位
export function deletePoint(id) {
  return request({
    url: `/api/points/${id}`,
    method: 'delete'
  })
} 